package cn.fzkj.gulimall.auth.entity;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;


/**
 * @DESCRIPTION 注册实体
 * @Author yaya
 * @DATE 2022/8/20
 */
public class RegisterEntity {

    @NotEmpty(message = "username can not be empty.")
    @Length(min = 3, max = 10, message = "username only allow 3 ~ 10 characters.")
    private String userName;
    @NotEmpty(message = "password can not be empty.")
    private String password;
    @NotEmpty(message = "phone number can not be empty.")
    @Pattern(regexp = "^[1]([3-9])[0-9]{9}", message = "phone number is not current.")
    private String phoneNum;
    @NotEmpty(message = "code can not be empty.")
    private String code;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
